﻿using System.Windows.Input;
using Columbus;
using Columbus.Commands;

namespace HelloColumbusApplication
{
    public class AppSettingsViewModel : ViewModel
    {
        public AppSettingsViewModel()
        {
            OkCommand = new DelegateCommand(()=>Navigator.NavigateBack());
        }

        public string ExampleSetting
        {
            get { return GetSetting(()=>ExampleSetting, string.Empty); }
            //Save will raise the property changed automatically
            set{ SaveSetting(()=>ExampleSetting, value); }
        }

        public ICommand OkCommand { get; private set; }
    }
}
